package pers.liyan.shi.springcloudkafkatest.kafka;

import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ConsumerTest {

    @KafkaListener(topics = {"Hello-Kafka"})
    public void consume(ConsumerRecord consumerRecord) {
        log.debug("consume msg {} : {}", consumerRecord.key(), consumerRecord.value());
    }

}
